{template /common/header}
    <style type="text/css">
        body{ background-color: #fff; }
    </style>
    <header>
        <a href="javascript:;" onClick="javascript :history.back(-1);" class="headerL iconfont">&#xe66a;</a>
        <h1>账单</h1>
    </header>
    <!-- E header -->
    
    <ul class="ykj_bill_head flex">
        <li><a href="/index.php?m=user&c=coupons&a=income">收入</a></li>
        <li class="cur"><a href="javascript:;">支出</a></li>
    </ul>

    <ul class="ykj_bill_items" id="listcon">
        <?php foreach($lists as $key=>$val){?>
        <li class="item">
            <div class="flex flex-pack-justify">
                <div>云矿机产出</div>
                <div><?php echo $val['money'];?>DBT</div>
            </div>
            <div class="time"><?php echo date("Y-m-d h:i:s",$val[dateline]);?></div>
        </li>
        <?php }?>
    </ul>










</body>
<script type="text/html" id="list_model">
<% if(list.length >0){%>
    <% for (var k in list) { var v = list[k]; %>

        <li class="item">
            <div class="flex flex-pack-justify">
                <div><%=v.msg%></div>
                <div><%=v.money%>DBT</div>
            </div>
            <div class="time"><%=v.addtime%></div>
        </li>

    <%}%>
    <li class="loading"><div class="spinner"><i></i></div>数据读取中</li>
<%  } %>
</script>
<script type="text/javascript" src="{THEME_PATH}js/template.js"></script>
<script type="text/javascript" src="{THEME_PATH}js/ncscroll-load.js"></script>
<script>
var type =1;
var pagesize = 10;
//渲染list
var load_class = new ncScrollLoad();
load_class.loadInit({'url':'/index.php?m=user&c=Coupons&a=spending','getparam':{'type':type},'tmplid':'list_model','containerobj':$("#listcon"),'iIntervalId':true});
    function tab(menus) {
        $(menus).click(function() {
            var index = $(this).index();
                $(this).addClass("cur").siblings().removeClass("cur");
                console.log($(this).data("type"));
                type = $(this).data("type");

                load_class.loadInit({
                  'url':'/index.php?m=user&c=trade&a=spending',
                  'getparam':{'type':type},
                  'tmplid':'list_model',
                  'containerobj':$("#listcon"),
                  'iIntervalId':true
                });
              // $(conts).eq(index).removeClass("hide").siblings().addClass("hide");
        })
    }
    tab(".my_deal_tab_title li")
    // $(function(){
    //     $('.header_screen_close').click(function(){
    //         seatype = $(".header_screen_con .list a.active").data('t');
    //        if (typeof seatype == 'undefined') {
    //             hd_alert('请选择筛选类型');
    //             return false;
    //        }
    //         $(".header_screen_con").stop().slideUp(500);
    //         $(".prompt-sorry-bj").fadeOut();
    //         // load_class.loadInit({'url':'/index.php?m=user&c=trade&a=tradelist','getparam':{'seatype':seatype},'tmplid':'list_model','containerobj':$("#listcon"),'iIntervalId':true});
    //     })
    // })
</script>


</html>